<{include file=$module.'/header.php'}>

<div class="page store-index" id="page-manage-home">
	<header class="bar bar-nav common-bar-nav" style="border-bottom: 0">
		<a class="pull-left external" href="/<{$module}>/my/index"><i class="fa fa-arrow-left"></i></a>
		<h1 class="title">值班设置</h1>
		<!-- <a class="pull-right external" href="/index/my/sign_log">记录</a> -->
	</header>
	<{include file=$module.'/nav.php'}>
	
	<div class="content">
		<div class="list-block media-list">
			<!-- <ul>
				<li class="store-title">
					<a href="javascript:;" class="item-content">
						<div class="item-media"><img src="" style='width: 3rem;'></div>
						<div class="item-inner">
							<div class="item-title-row">
								<div class="item-title">测试</div>
							</div>
							<div class="item-subtitle">营业时间:8~8,2~2</div>
						</div>
					</a>
				</li>
			</ul> -->
			<ul style="border-top: 0">
				<li class="business-hours">
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title">上班状态</div>
							<div class="item-after">
								<label class="label-switch invoice-status">
									<input type="checkbox" name="sign" value="1"<{if $admin.is_sign}> checked<{/if}>>
									<div class="checkbox"></div>
								</label>
							</div>
						</div>
					</div>
				</li>
				<li class="business-hours">
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title">值班状态</div>
							<div class="item-after">
								<label class="label-switch invoice-status">
									<input type="checkbox" name="zhiban" value="1"<{if $admin.is_zhiban}> checked<{/if}>>
									<div class="checkbox"></div>
								</label>
							</div>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</div>

</div>

<script>
$(function(){
	$(document).on('click', ':checkbox[name="sign"]', function(){
		var sign = $(this).prop('checked') ? 1 : 0;
		$.post("/<{$module}>/my/setting", {do:'sign',sign: sign}, function(response) {
			$.toast(response.msg);
			// $.toast(response.result, "/<{$module}>/my/sign");
		});
	});
	$(document).on('click', ':checkbox[name="zhiban"]', function(){
		var zhiban = $(this).prop('checked') ? 1 : 0;
		$.post("/<{$module}>/my/setting", {do:'zhiban',zhiban: zhiban}, function(response) {
			$.toast(response.msg);
			// $.toast(response.msg, "/<{$module}>/my/sign");
		});
	});
});
</script>
<{include file=$module.'/footer.php'}>